home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / nihcl-30.lha / nihcl-3.0 / lib / ExceptAct.h < prev    next >
C/C++ Source or Header  |  1990-05-19  |  2KB  |  58 lines

  1. #ifndef    EXCEPTACT_H
  2. #define    EXCEPTACT_H
  3.  
  4. /*$Header: /afs/alw.nih.gov/unix/sun4_40c/usr/local/src/nihcl-3.0/share/lib/RCS/ExceptAct.h,v 3.0 90/05/20 00:19:28 kgorlen Rel $*/
  5.  
  6. /* ExceptAct.h -- declarations for exception actions
  7.  
  8.     THIS SOFTWARE FITS THE DESCRIPTION IN THE U.S. COPYRIGHT ACT OF A
  9.     "UNITED STATES GOVERNMENT WORK".  IT WAS WRITTEN AS A PART OF THE
  10.     AUTHOR'S OFFICIAL DUTIES AS A GOVERNMENT EMPLOYEE.  THIS MEANS IT
  11.     CANNOT BE COPYRIGHTED.  THIS SOFTWARE IS FREELY AVAILABLE TO THE
  12.     PUBLIC FOR USE WITHOUT A COPYRIGHT NOTICE, AND THERE ARE NO
  13.     RESTRICTIONS ON ITS USE, NOW OR SUBSEQUENTLY.
  14.  
  15. Author:
  16.     K. E. Gorlen
  17.     Computer Systems Laboratory, DCRT
  18.     National Institutes of Health
  19.     Bethesda, MD 20892
  20.  
  21. $Log:    ExceptAct.h,v $
  22.  * Revision 3.0  90/05/20  00:19:28  kgorlen
  23.  * Release for 1st edition.
  24.  * 
  25. */
  26.  
  27. #include "Exception.h"
  28. #include "nihclerrs.h"
  29.  
  30. class ExceptionAction;
  31. class Process;
  32.  
  33. class ExceptionActionTbl : public NIHCL {
  34. private:
  35.     static ExceptionActionTbl* active;
  36.     friend ExceptionAction;
  37.     friend void NIHCL::setError(int error, int sev, ...);
  38.     friend Process;
  39. private:
  40. #ifndef NESTED_TYPES
  41.     exceptionTrapTy client_exception_trap;
  42.     exceptionActionTy action[NIHCL__LAST_ERROR-NIHCL__FIRSTERROR+1];
  43. #else
  44.     ExceptionTrap::exceptionTrapTy client_exception_trap;
  45.     ExceptionAction::exceptionActionTy
  46.         action[NIHCL__LAST_ERROR-NIHCL__FIRSTERROR+1];
  47. #endif
  48.     friend ExceptionAction;
  49.     friend AbortException;
  50.     friend RaiseException;
  51.     friend ExceptionTrap;
  52. public:
  53.     ExceptionActionTbl();
  54.     void act(unsigned error, int sev);
  55. };
  56.  
  57. #endif
  58.